﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AMS.UI.Menu
{
    /// <summary>
    /// 菜单点击事件的通知对象。菜单创建类不直接处理点击事件，而是路由到此类对象上
    /// </summary>
    public interface IMenuClickAction
    {
        /// <summary>
        /// 处理点击事件之前的函数，事件可以被拦截
        /// </summary>
        /// <param name="menuItem"></param>
        /// <param name="cancel"></param>
        void BeforeProcessMenuClick(object menuItem, ref bool cancel);
        /// <summary>
        /// 处理点击事件
        /// </summary>
        /// <param name="menuItem"></param>
        void OnMenuClick(object menuItem);
        /// <summary>
        /// 处理点击事件之后的函数
        /// </summary>
        /// <param name="menuItem"></param>
        void AfterProcessMenuClick(object menuItem);
    }
}
